﻿using Game.Common;
using Game.Level;
using Game.Map;
using Game.Objects;

namespace Game.Ai
{
    public abstract class AiController 
    {
        readonly Vehicle _vehicle;
        readonly IGameMapView _gameMapView;
        readonly GameLevels _gameLevels;
        readonly GameTurn _gameTurn;

        protected AiController(
            Vehicle vehicle, 
            IGameMapView map, 
            GameLevels levels,
            GameTurn turn)
        {
            _vehicle = vehicle;
            _gameMapView = map.Views[vehicle.Owner];
            _gameLevels = levels;
            _gameTurn = turn;
        }
        
        public Vehicle Vehicle
        {
            get { return _vehicle; }
        }
        
        public IGameMapView GameMap
        {
            get { return _gameMapView; }
        }
        
        public IGameMapView GameMapView
        {
            get { return _gameMapView; }
        }

        public GameLevels GameLevels
        {
            get { return _gameLevels; }
        }

        public GameTurn GameTurn
        {
            get { return _gameTurn; }
        }
        
        public abstract void DoTurn();
        
    }
}
